package book;

public class BookList {
    private Book[] books=new Book[10];
    private int userSize;

    public BookList() {
        books[0]=new Book("三国演义","罗贯中",10,"小说");
        books[1]=new Book("水浒传","施耐庵",11,"小说");
        books[2]=new Book("西游记","吴承恩",12,"小说");
        books[3]=new Book("红楼梦","曹雪芹",13,"小说");
    }

    public Book getBook(int pos){
        return books[pos];
    }

    public void setBooks(int pos,Book book){
        books[pos]=book;
        userSize++;
    }

    public int getUserSize() {
        return userSize;
    }

    public void setUserSize(int userSize) {
        this.userSize = userSize;
    }
}
